#include "stm32f10x.h"                  // Device header
#include "Delay.h"
#include "myusart.h"
#include "DHT11.h"

int main(void)
{
	MYUSART_Init();
	float humi,temp;
	while(1){
		if(DHT11_ReadData(&humi,&temp)){						//读取温湿度数据
			MYUSART_SendFloatNumber(humi,1);					//通过串口发送湿度
			MYUSART_SendFloatNumber(temp,1);					//通过串口发送温度
		}else{
			MYUSART_SendString("Read data error.\r\n");
		}
		Delay_ms(1000);
	}
}
